<?php

$itemid = $_POST['ItemID'];
$title = $_POST['Title'];
$contenttt = $_POST['Contenttt'];
$content_es=sqlite_escape_string($contenttt);


if (!empty($itemid)) {

   $dbhandle = sqlite_open('/tmp/tagfs.db', 0666, $error);

   if (!$dbhandle) die ($error);
   
   $stm = "INSERT INTO Item (ItemID, Title, Content) VALUES ($itemid, '$title', '$content_es' )";
   $ok = sqlite_exec($dbhandle, $stm, $error);

   if (!$ok) die("Error: $error");  
   echo "Form submitted successfully";
}
?>
